<?php

$position = $this->position;
$blocks = $this->blocks;

?>
<div id="<?php echo $this->escape($position) ?>">
	<ul class="block_list">
<?php

for ($i = 0, $blocksCount = count($blocks); $i < $blocksCount; ++$i) {
	$block = $blocks[$i];

?>
		<li class="block <?php echo $this->escape($block->controller), '-', $this->escape($block->action), ' ', $this->escape($block->alias), ($i == 0 ? ' first' : ''), ($i == $blocksCount - 1 ? ' last' : '') ?>">
<?php

if ($block->params['showBlockTitle'])
	echo '<h3>', $block->title, "</h3>\n";
echo $block->response, "\n";

?>
		</li>
<?php } ?>
	</ul>
</div>
